//
//  VideoListModel.m
//  coba-iOS
//
//  Created by 郭四虎 on 15/12/22.
//  Copyright © 2015年 YouKu. All rights reserved.
//

#import "VideoListModel.h"

@implementation VideoListModel

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"id"]) {
        self.videoid = value;
    }else if ([key isEqualToString:@"description"]){
        
        self.desc = value;
    }
}
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
    if (self = [super init]) {
        
        self.videoid = [aDecoder decodeObjectForKey:@"videoid"];
        self.title = [aDecoder decodeObjectForKey:@"title"];
        self.content = [aDecoder decodeObjectForKey:@"content"];
        self.img_url = [aDecoder decodeObjectForKey:@"img_url"];
        self.desc = [aDecoder decodeObjectForKey:@"desc"];
        self.video_page_url = [aDecoder decodeObjectForKey:@"video_page_url"];
        self.intro = [aDecoder decodeObjectForKey:@"intro"];
        self.video_url = [aDecoder decodeObjectForKey:@"video_url"];
        self.clickDate = [aDecoder decodeObjectForKey:@"clickDate"];
    }
    return self;
}

- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.videoid forKey:@"videoid"];
    [aCoder encodeObject:self.title forKey:@"title"];
    [aCoder encodeObject:self.content forKey:@"content"];
    [aCoder encodeObject:self.img_url forKey:@"img_url"];
    [aCoder encodeObject:self.desc forKey:@"desc"];
    [aCoder encodeObject:self.video_page_url forKey:@"video_page_url"];
    [aCoder encodeObject:self.intro forKey:@"intro"];
    [aCoder encodeObject:self.video_url forKey:@"video_url"];
    [aCoder encodeObject:self.clickDate forKey:@"clickDate"];
}

@end
